home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / DevCon / Atlanta_1990 / Atlanta-Devcon.2 / Libraries / GadTools / ReadMe < prev   
Encoding:
Text File  |  1992-08-26  |  2.5 KB  |  76 lines

  1. Gadget Toolkit Example Code
  2.  
  3. 1990 Amiga Developers Conference, Atlanta.
  4.  
  5. There are four example programs, each of which may be compiled with
  6.  
  7.     lc -L
  8.  
  9. or
  10.  
  11.     lc -L -cfist -v
  12.  
  13.  
  14. menu1.c:
  15.  
  16. This is an example of using GadTools menus.  It creates a menu strip
  17. that has two menus, with several items each.  Sub-menus and separator
  18. bars are also shown.  This program prints out information regarding
  19. any menu activity.  If run with no parameters, menu1 will use the
  20. screen's font to layout the menus.  Optionally, menu1 takes a font
  21. name and size as parameters, and it will lay the menus out using the
  22. font you specify if it is available.  You might say
  23.  
  24.     menu1 times.font 24
  25.  
  26.  
  27. gadget1.c:
  28.  
  29. This is a straightforward example of creating GadTools gadgets.  It
  30. creates a string gadget, a slider gadget, and a button gadget.  The
  31. program prints out descriptions of the gadget activity it sees.  As
  32. well, clicking on the button increments the slider by one, until it
  33. wraps back around.
  34.  
  35.  
  36. gadget2.c:
  37.  
  38. This is an example of how one might do font-sensitive gadget layout
  39. using GadTools.  This program prints out information regarding any
  40. gadget activity.  If run with no parameters, gadget2 will use the
  41. screen's font to layout its gadgets.  Gadget2 optionally takes a font
  42. name and size as parameters, and it will lay its gadgets out using
  43. the font you specify if it can find it.  You might say
  44.  
  45.     gadget2 helvetica.font 15
  46.  
  47.  
  48. gadtools1.c:
  49.  
  50. This is a fairly involved example of GadTools gadgets and menus, and
  51. interactions between them.  It demonstrates the twelve specific kinds
  52. of GadTools gadgets, as well as many of the features of menus.
  53.  
  54. The following is a list of the interactions:
  55.  
  56. The "Gadgets" menu has an item "Foo" with sub-items "Set", "Clear",
  57. and "Toggle".  These will set, clear, or toggle the checkbox gadget
  58. labelled "Foo".
  59.  
  60. The "Gadgets" menu has a "Slider" item with sub-items "Increase" and
  61. "Decrease".  Selecting these will increment or decrement the slider
  62. gadget by 1, 5, or 10, which is also selectable by menu.
  63.  
  64. Clicking on the "ClickMe" button will change the contents of the
  65. integer gadget to the number "271828".
  66.  
  67. If the "Gadgets/MX Gadgets/Connected" sub-menu item is checked, then
  68. selecting Monday through Sunday from the mutually exclusive gadgets
  69. will set the cycle gadget to January through July respectively.
  70. Likewise, setting the cycle gadget to one of the first seven months
  71. will change the selected mutually exclusive gadget to the
  72. corresponding day.
  73.  
  74. If you drag the slider to a level between 0 and 11, the currently
  75. selected item in the listview will be set to the item of that number.
  76.